﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Common.Model;

namespace SEG.Model
{
    public class AdministrarPermisosView : ViewEntity
    {
        public const string NombrePropertyName = "Nombre";
        public string Nombre { get; set; }

        public const string FormularioPropertyName = "Formulario";
        public string Formulario { get; set; }

        public const string AccionesPropertyName = "Acciones";
        public IEnumerable<String> Acciones { get; set; }

        public const string AccionesStringPropertyName = "AccionesString";
        public String AccionesString
        {
            get
            {
                StringBuilder str = new StringBuilder();
                foreach (var item in Acciones)
                {
                    str.AppendFormat("{0}, ", item);
                }
                return str.ToString().TrimEnd(',', ' ');
            }
        }

    }
}
